﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucSPLienQuan.ascx.cs"
    Inherits="ucControl_ucSPLienQuan" %>
<div id="right">
    <div class="sanpham">
        <div class="next_pre">
            <h1>
                Sản phẩm cùng nhóm</h1>
            <div style="float: right">
                <a id="prev2" class="prev" href="#">&lt;</a> <a id="next2" class="next" href="#">&gt;</a></div>
        </div>
        <div class="list_carousel">
            <ul id="foo2">
             <asp:Repeater ID="rpItem" runat="server">
                <ItemTemplate>
                    <li>
                        <div class="item">
                            <asp:HyperLink ID="hypImage" rel="lightbox-mygallery" runat="server" NavigateUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/img/Items/" + Eval("ImageURL")  %>'
                                ToolTip='<%# Eval("ItemName") %>'>
                                <asp:Image ID="imgPro" runat="server" Style="width: 180px; height: 150px; top: 0px;
                                    left: 0px;" ImageUrl='<%#"~/ImageProcess.ashx?file=" + "~/Admin/img/Items/" + Eval("ImageURL") %>' />
                            </asp:HyperLink>
                        </div>
                        <div class="sp">
                            <p class="ten_sp">
                            <%--    <asp:HyperLink ID="hylink" runat="server" NavigateUrl='<%#"~/chitietsanpham/" + Eval("ItemID")+ "/"+ Eval("IDGroup") %>'>
                                     <%# Eval("ItemName") %>
                                </asp:HyperLink>--%>
                                 <asp:HyperLink ID="hylink" runat="server" NavigateUrl='<%# "~/Chi-tiet-san-pham.aspx?id=" + Eval("ItemID")+ "&idgroup="+Eval("IDGroup")  %>'>
                                     <%# Eval("ItemName") %>
                                </asp:HyperLink>
                                
                            </p>
                            <p class="gia_sp">
                                <%--<%# Eval("BaseSellingPrice") %>--%>
                                <%--  <%# DataBinder.Eval(Container.DataItem, "BaseSellingPrice", "{0:c}")%>--%>
                                <%# double.Parse (Eval("BaseSellingPrice").ToString()).ToString("0,00.##") %>
                                VNĐ
                            </p>
                            <table border="0" cellspacing="3" cellpadding="0">
                                <tr>
                                    <td width="1">
                                        <asp:HyperLink ID="lnk" runat="server" NavigateUrl='<%# "~/Chi-tiet-san-pham.aspx?id=" + Eval("ItemID")+ "&idgroup="+Eval("IDGroup") %>'>
                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/images/chitiet.png" />
                                        </asp:HyperLink>
                                    </td>
                                    <td>
                                    </td>
                                    <td width="1">
                                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='' ToolTip="Thêm vào giỏ hàng">
                                            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/dathang.png" onclick='<%#string.Format("fn_AddToCart(\"{0}|{1}|{2}\")", Eval("ItemID").ToString(), Eval("BaseSellingPrice").ToString(),"0")%>' />
                                        </asp:HyperLink>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
            </ul>
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript">
    function fn_AddToCart(productCodeAndPrice) {
        PageMethods.SetShoppingCartSesstion(productCodeAndPrice, SetShoppingCart);
    }
</script>
